<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ page contentType="text/html; charset=UTF-8" language="java"
	import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/page/base.jsp"%>
<%@ taglib prefix="d" uri="/doone-comm-ui-tags"%>

<html>
	<head>
		<title>企业门店信息</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">

		<link type="text/css" href="<%=path%>/manage/css/layout.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="<%=path%>/manage/css/Tooltip.css" />
        <link type="text/css" href="<%=path%>/manage/css/new_style.css" rel="stylesheet" />
        <link type="text/css" href="<%=path%>/manage/css/jquery.dropdownchecklist.css" rel="stylesheet" />
        
		<script type="text/javascript" src="<%=path%>/manage/js/jquery-1.4.4.min.js"></script>
		<script type="text/javascript" src="<%=path%>/manage/js/easyTooltip.js"></script>
		<script type="text/javascript" src="<%=path%>/manage/js/jquery.dropdownchecklist.core.js"></script>
		<script type="text/javascript" src="<%=path%>/manage/js/jquery.dropdownchecklist.js"></script>
		
		<script type="text/javascript" src="<%=path%>/manage/js/jquery-ui-1.8.11.custom.min.js"></script>
		<script type="text/javascript" src="<%=path%>/manage/js/jquery.wysiwyg.js"></script>
		<script type="text/javascript" src="<%=path%>/manage/js/hoverIntent.js"></script>
		<script type="text/javascript" src="<%=path%>/manage/js/superfish.js"></script>
		<script type="text/javascript" src="<%=path%>/manage/js/custom.js"></script>
		<script type="text/javascript" src="<%=path%>/manage/js/pcc/cascade-1.0.3.js"></script>
		<%@ include file="managerJsAndCss.jspf" %>
	</head>


	<body onselectstart="return false;">
		<div>
			<p class="sitemap">
				当前位置：分类管理 > 详情信息管理
			</p>
			<div>
				<!-- Tabs -->
				<div id="tabs">
					<ul>
						<li>
							<a href="#tabs-1">门店列表</a>
						</li>

					</ul>
					<div class="bottom_line" style="height: 40px">
						<span class="toolbar_right">
							<a class="btn_add_bq" onclick="javascript:$('#newTagDialog').dialog('open');" href="javascript:void(0);">新增标签</a>
						</span>
						<a class="btn_addnew" onclick="showLoadStatus();" href="<%=path %>/enterShop/getEditEnterShop.action?intShopId=-1&fromUrl=c&intCateId=<s:property value="intCateId"/>">增加门店</a>
					</div>
					<!-- 检索 -->
					<form name="searchForm" id="searchForm" method="post"
						action="<%=path%>/dataBinding/getAppContent.action?intCateId=<s:property value="intCateId"/>"
						style="margin: 10px 0;">
						关键字:
						<s:textfield onfocus="if(this.value=='请输入门店名称或地址'){this.value=''}" onblur="if(this.value==''){this.value='请输入门店名称或地址'}" name="condition.varShopName" id="varShopName"></s:textfield>
						地区：
						<select name="condition.varShopProvince" id="varShopProvince"></select>
						<select name="condition.varShopCity" id="varShopCity"></select>
						<select name="condition.varShopArea" id="varShopArea"></select>
						<s:hidden name="condition.intAppId"></s:hidden>
						<s:hidden name="condition.intCateId"></s:hidden>
						<s:hidden name="condition.intEnterpId"></s:hidden>
						<s:hidden name="condition.tags" id="filterTags"></s:hidden>
						<s:hidden name="condition.tagShowStatus" id="tagShowStatus"></s:hidden>
						<s:hidden name="showAll" id="showAll"></s:hidden>
						<input type="submit" id="searchBtn" onclick="showLoadStatus();" value="检索">
						<input type="button" id="setBtn" onclick="resetSearch();" value="重置">
					</form>
					<!-- 检索 END-->
					<!-- 标签 -->
					<div>
						<div>
							<s:if test="usedTags.size()>0">
								<span class="bq_title">标签：</span>
								<a href="javascript:void(0);" id="tagShowBtn" class="btn_zk"></a>
								<div style="clear: both;"></div>
							</s:if>
						</div>
						<ul class="bq_ul" id="tagCloud">
							<s:iterator value="usedTags" status="st">
								<s:if test="status==1">
									<li class="bqdout" clicked="true" index="<s:property value="id" />">
								</s:if>
								<s:else>
									<li class="bq" clicked="false" index="<s:property value="id" />">
								</s:else>
									<div>
										<i class="bq_word" id="tag_<s:property value="id" />"><s:property value="title"/></i>
										<i class="bq_num">(<s:property value="count" />)</i>
										<i class="btn_bq_edit"></i>
										<i class="btn_bq_del"></i>
									</div>
									<div class="clear"></div>
								</li>
							</s:iterator>
						</ul>
					</div>
					<!-- 标签 END-->
					<table class="fullwidth" cellpadding="0" cellspacing="0" border="0"
						id="enterInfoTab">
						<thead>

							<tr>
								<td>
									<input type="checkbox" id="checkAll" onclick="checkAll(this);">
								</td>
								<td>
									门店预览
								</td>
								<td width="60">
									门店名称
								</td>
								<td>
									电话
								</td> 
								<td>
									地址
								</td>
								<td>
									标签
								</td>
								<td>
									<span>操作<img alt="刷新" onclick="refreshData();" title="刷新数据和顺序" style="width:16px;height:16px;margin-left:8px;vertical-align:bottom;" src="<%=path%>/images/refresh.png" /></span>
								</td>
							</tr>
						</thead>
						<tbody class="grid_table">
							<s:iterator value="shopList" status="st">
								<tr index="<s:property value='#st.index'/>" id="<s:property value='intShopId'/>">
									<td>
										<input type="checkbox">
									</td>
									<td>
										<s:if test="varIconUrl!=null">
											<img src="<%=serverUrl%><s:property value="varIconUrl" />" width="76"
												height="53" onclick="javascript:window.open('<%=serverUrl%><s:property value="varIconUrl" />');">
										</s:if>
										<s:else>
											<span style="display:block;width:76;height:53;background:#eee;border:solid 1px #ddd;text-align:center">暂无图片，请上传</span>
										</s:else>
									</td>
									<td style="word-break: keep-all;white-space:nowrap;">
										<s:if test="varShopName.length()>10">
											<s:property value="varShopName.substring(0,10)" />...
										</s:if>
										<s:else>
											<s:property value="varShopName" />
										</s:else>
									</td>
									<td>
										<s:property value="varShopPhonenum" />
									</td>

									<td style="word-break: keep-all;white-space:nowrap;">
										<s:if test="varShopAddress.length()>20">
											<s:property value="varShopAddress.substring(0,20)" />...
										</s:if>
										<s:else>
											<s:property value="varShopAddress" escape="false" />
										</s:else>
									</td>
									<td style="word-break:break-all; word-wrap:break-word;">
										<s:property value="tags" />
									</td>
									<td style="width:90;">
										<a  class="icon icon_edit" title="编辑 " href="javascript:void(0);" onclick="doEditShop(this,'<s:property value="intShopId" />');"></a>
										<a class="icon icon_delete" title="删除 " href="javascript:void(0);" onclick="delEnterShop('<s:property value="intShopId" />','<s:property value="intContentId" />','<s:property value="intCateId"/>',this)"></a>
									</td>

								</tr>
							</s:iterator>
						</tbody>
					</table>
					<div id="tableBottomBar">
						<div style="height:20px;line-height:20px;float:left;margin-right:10px;">
							<span>为选中的门店添加标签</span>
						</div>
						 <select id="multiTags" multiple="multiple">
						 	<option value="-1">全部</option>
							<s:iterator value="usedTags">
								<option value="<s:property value='id' />"><s:property value='title' /></option>
							</s:iterator>
						</select>
						<input style="margin-left:10px;" type="button" id="saveTagsForShopBtn" value="保存" onclick="saveTagsForShop()" />
						<s:if test="pageContent.totalRecord>pageContent.pageRecord">
							<span style="margin-left:15%;cursor:pointer" onclick="showAllData(1);">加载全部数据</span>
						</s:if>
						<s:elseif test="pageContent.totalRecord>10">
							<span style="margin-left:15%;cursor:pointer" onclick="showAllData(0);">分页显示数据</span>
						</s:elseif>
					</div>
				</div>
				<!-- 分页标签开始 -->
				<div align="right" style="float: right;">
					<d:page id="pageContent" template="details" skin="gray" >
					</d:page>
				</div>
				<!-- 分页标签结束 -->
			</div>
			<div id="newTagDialog" style="display:none;">
				<span style="color:red">输入并按回车可再添加一个标签，长度不超过20个字符</span><br>
				<input type="text" onKeyDown="saveAndNew(event,this);" onpaste="return false;" onchange="limitText(this);" onKeyUp="limitText(this);" maxLength="20" style="width:200;margin:5 auto 5 30;" />
				<input type="hidden" name="newTagsContainer" id="newTagsContainer" />
			</div>
		</div>
	</body>
</html>
